"""
定义函数，获取登录成功令牌，组织请求头
"""
from api.login import LoginAPI
from common.gen_pwd import generate_password
from config import Tel


def get_headers():
    data = {"mobile": Tel  , "password": generate_password("929itheima.CN032@")}
    resp = LoginAPI().login(data)
    headers = {"Authorization": resp.json().get('data')}
    return headers


if __name__ == '__main__':
    print(get_headers())
